package tester.neural.ui;

import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;

public class FieldPanel extends JPanel {
	private static final long serialVersionUID = 1L;
	
	private JPanel panel;
	
	public FieldPanel() {
		panel = new JPanel();
		setLayout(new BorderLayout());
		
		addButton("guess", new GuessListener());
		addButton("clear", new ClearListener());
		
		add(panel, BorderLayout.SOUTH);
	}
	
	private void addButton(String label, ActionListener listener) {
		JButton button = new JButton(label);
		button.addActionListener(listener);
		panel.add(button);
	}
}
